<script type="text/javascript">
// 	$(function() {
// 		$('#exportReportForm').form({
// 			onSubmit : function(event) {
// 				printLog(event);
// // 				exportReportFormAction();
// 				return true;
// 			}
// 		});
// 	});
		
		//导出报表
		function exportReportFormAction(datagridId) {
			printLog(datagridId);
			
//            	var exportFormData = $('#exportReportForm').serialize();
			var exportFormData = "configId="+$('#exportConfigId').val()+"&exportType="+$('#exportType').combobox('getValue')+"&exportCount="+$('#exportCount').val();
   			printLog(exportFormData);
   			//列表查询条件
			var params = $('#'+datagridId).datagrid('options').queryParams;
			printLog(params);
			for(var key in params)  {
				printLog("属性：" + key + ",值："+ params[key]);  
				exportFormData += ('&'+key+'='+params[key]);
			}  
			exportFormData = encodeURI(exportFormData);
		    printLog(encodeURI(exportFormData));
   			if($('#downloadForm')) $('#downloadForm').remove();
   			var downloadForm  = $("<form id=\"downloadForm\">");//定义一个form表单
   			downloadForm.attr("style","display:none");
   			downloadForm.attr("target","");
   			downloadForm.attr("method","post");
   			downloadForm.attr("action",'readReport.do?exportReport&'+exportFormData);
   			var input1=$("<input>");
   			input1.attr("type","hidden");
   			input1.attr("name","exportData");
   			input1.attr("value",(new Date()).getMilliseconds()); 
   			$("body").append(downloadForm);//将表单放置在web中
   			downloadForm.append(input1);
   			downloadForm.submit();//表单提交
   			return false;
		}
		

	
</script>
<form id="exportReportForm">
<!-- <form id="downloadForm" style="display:none" target="" method="post" action="readReport.do?exportReport&configId=3&exportType=pdf&exportCount="><input type="hidden" name="exportData" value="362"></form> -->
<table style="border: 0px; width: 100%; height: 100%; overflow: hidden;">
	<input id="exportConfigId" type="hidden" name="configId" value="${(configItem.id)!}" />
	<tr>
		<td>
			导出类型：
		</td>
		<td>
			<@eu.comboBox id="exportType" url="common.do?loadComboBox&key=EXPORT_REPORT_TYPE" name="exportType" required="true"/>
		</td>
	</tr>
	<tr>
		<td>
			导出数量：
		</td>
		<td>
			<input id="exportCount" name="exportCount" value="" width="150px" class="easyui-validatebox textbox"/>
		</td>
	</tr>
	<tr>
		<td>
			总记录条数：
		</td>
		<td>
			<label id="configReportTotal" style="color: red;">${totalRecord!0}&nbsp;条</label>
		</td>
	</tr>
</table>
</form>


